# How the Latched push button works at run time

When the operator first presses the button, it changes from State 0 to State 1 and sends the State 1 value to the data source. The button retains this value until unLatched by the Handshake connection.

The Latched push button’s behavior at run time also depends on how you set up the latch reset type and controls.

## Unlatch the button

- If the Latch reset type (specified on the General tab of the Latched Push Button dialog box) is "Non-zero," when the Handshake connection is a non-zero value, the application unlatches the button. If the operator presses the button while the Handshake connection is a non-zero value, the button remains unlatched.
- If the latch reset type is "Zero to non-zero transition," when the Handshake connection changes from 0 to a non-zero value, the application unlatches the button.
- If the button is in the latched state and the operator presses the button, the application writes out the latched (State 1) value again.

## Use controls

- If you assign just the Value connection and not the Indicator connection, the button’s pressed state is shown as soon as the button is pressed. The feedback for this connection is local and immediate. It does not necessarily reflect the Value connection’s value in the data source.
- If you assign the same tag to the Value and Indicator controls, at run time the shown button state is based on the Indicator connection. If network traffic is heavy, the display response might be delayed.
- If the Indicator connection value is a floating point value, the application rounds the value to the nearest integer to determine the state to display.

## Open and close graphic displays

- When you open a display at run time, the application reads the Indicator connection and sets the button to that state.

  If the value does not match either state’s value, the error state is shown. When the operator presses the button, it changes to State 1.

- When you open a display at run time, the application reads the Indicator connection value and updates the display based on the value.
- When you open a display at run time, the application reads the value of the Handshake connection.
- When you close a display at run time, subsequent changes to the Handshake connection do not affect the Latched push button.

## See also

Causes of run-time errors for the Latched push button

About the Latched push button's error state

Set up controls for the Latched push button

Configure the Latched push button